﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;

using Plugin;
using StandardLibrary;
using StandardFramework;

namespace StandardLibraryXNA
{
    [ClassAttribute("XNA Bound", "Plugin.Media.brick.ico")]
    public class BoundComponentXNAData : BaseComponent
    {
        public Rectangle BoundXNA;

        public bool Visible;

        [FieldAttribute("System Bound", "Plugin.Media.brick_link.ico")]
        public BoundComponentData Bound;

        public BoundComponentXNAData(BoundComponentData bound)
        {
            Bound = bound;
            BoundXNA = new Rectangle();

            Bound.Change += new BoundComponentData.ChangeHandler(Bound_Change);
            Bound_Change(null, null);
        }

        [MethodAttribute("Bound_Change", "Plugin.Media.gear_in.ico")]
        public void Bound_Change(object sender, EventArgs args)
        {
            BoundXNA.X = Bound.Bound.X;
            BoundXNA.Y = Bound.Bound.Y;
            BoundXNA.Width = Bound.Bound.Width;
            BoundXNA.Height = Bound.Bound.Height;
        }
    }
}
